package test4;

import java.util.Locale;

//其他操作
public class TestDemo6 {
    public static void main(String[] args) {
        String str="abcdef";
        System.out.println(str.length());//6
        System.out.println(str.isEmpty());//false
    }

    public static void main3(String[] args) {
        String str="abcdef";
        String ret=str.concat("aaa");//字符串拼接
        System.out.println(ret);//abcdefaaa
    }

    public static void main2(String[] args) {
        String str="abcdefBFRG";
        String ret=str.toUpperCase();
        System.out.println(ret);//ABCDEFBFRG
        System.out.println("=====");
        String ret2=str.toLowerCase();
        System.out.println(ret2);//abcdefbfrg

    }

    public static void main1(String[] args) {
        String str="     abc   defg    ";
        String ret=str.trim();//取出左右的空格
        System.out.print(ret);
        System.out.println("========");
    }
}
